home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / clients / xmag / rootwind.c < prev    next >
Text File  |  1994-08-12  |  3KB  |  89 lines

  1. /* $XConsortium: RootWindow.c,v 1.1 90/12/06 20:39:39 dave Exp $ */
  2.  
  3. /*
  4.  * Copyright 1990 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  */
  24.  
  25. #ifdef MSDOS
  26. #include "X11/IntrinsP.h"      /* QDK 05/17/1994  4:19pm. */
  27. #else
  28. #include "X11/IntrinsicP.h"
  29. #endif
  30. #include <X11/StringDefs.h>
  31. #ifdef MSDOS
  32. #include "RootWndP.h"
  33. #else
  34. #include "RootWindoP.h"
  35. #endif
  36.  
  37. static void Realize();
  38.  
  39. RootWindowClassRec rootWindowClassRec = {
  40.   { /* core fields */
  41.     /* superclass        */    (WidgetClass) &widgetClassRec,
  42.     /* class_name        */    "RootWindow",
  43.     /* widget_size        */    sizeof(RootWindowRec),
  44.     /* class_initialize        */    NULL,
  45.     /* class_part_initialize    */    NULL,
  46.     /* class_inited        */    FALSE,
  47.     /* initialize        */    NULL,
  48.     /* initialize_hook        */    NULL,
  49.     /* realize            */    Realize,
  50.     /* actions            */    NULL,
  51.     /* num_actions        */    0,
  52.     /* resources        */    NULL,
  53.     /* num_resources        */    0,
  54.     /* xrm_class        */    NULLQUARK,
  55.     /* compress_motion        */    TRUE,
  56.     /* compress_exposure    */    TRUE,
  57.     /* compress_enterleave    */    TRUE,
  58.     /* visible_interest        */    FALSE,
  59.     /* destroy            */    NULL,
  60.     /* resize            */    NULL,
  61.     /* expose            */    NULL,
  62.     /* set_values        */    NULL,
  63.     /* set_values_hook        */    NULL,
  64.     /* set_values_almost    */    XtInheritSetValuesAlmost,
  65.     /* get_values_hook        */    NULL,
  66.     /* accept_focus        */    NULL,
  67.     /* version            */    XtVersion,
  68.     /* callback_private        */    NULL,
  69.     /* tm_table            */    NULL,
  70.     /* query_geometry        */    XtInheritQueryGeometry,
  71.     /* display_accelerator    */    XtInheritDisplayAccelerator,
  72.     /* extension        */    NULL
  73.   },
  74.   { /* rootWindow fields */
  75.     /* empty            */    0
  76.   }
  77. };
  78.  
  79. WidgetClass rootWindowWidgetClass = (WidgetClass)&rootWindowClassRec;
  80.  
  81. /*ARGSUSED*/
  82. static void Realize(w, value_mask, attributes)
  83.     Widget    w;
  84.     XtValueMask *value_mask;
  85.     XSetWindowAttributes *attributes;
  86. {
  87.     w->core.window = RootWindowOfScreen(w->core.screen);
  88. }
  89.